package com.xjh.utils.enumutils;

import lombok.Getter;
import lombok.Setter;

public enum CodeEnum {

    DATA_NOT_EXISTS(1000,"数据不存在"),
    LOGIN_FAIL(2000,"用户名或密码错误"),
    EXECUTE_ERROR(3000,"执行出错"),
    EXECUTE_SUCCESS(4000,"执行成功"),
    PARAMS_ERROR(5000,"参数错误"),
    TIMEOUT(6000,"执行超时"),
    USERNAME_PASSWORD_NULL(7000,"用户名及密码不能为空"),
    ALREADY_LOGIN(8000,"用户已经在其他设备登录，登录失败"),
    IMPORT_FAIL(9000,"执行出错"),
    LOGIN_INVALID(9002,"无效token或登录已过期，请重新登录"),
    ALREADY_EXIST(9001,"账号已存在"),
    TEST500(500,"测试500异常");


    @Getter
    @Setter
    private int code;

    @Getter
    @Setter
    private String desc;

    CodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
